//
// Project: Disagreement in science: Missing women

clear all
version 15.1

//
// set globals

// project directory
global project // ** TYPE PROJECT DIRECTORY HERE **

// data directory
global data "${project}/disagreement_restat_data"

// code directory
global code "${project}/disagreement_restat_code"

// output directory
global output "${project}/disagreement_restat_results/output"

// temporary directory
global temporary "${project}/disagreement_restat_results/temporary"

  

//
// analysis code

//
// main text 

// figure 1: female authorship publications
do "${code}/figure_female_representation_trend_publications.do"

// figure 2: female share solo author publications
do "${code}/figure_fraction_solo_author_publications.do"

// figure 3: female authorship preprints
do "${code}/figure_female_representation_trend_preprints.do"

// figure 4: choice in experiment
do "${code}/figure_choice_experiment.do"


//
// online appendix

// table a1: descriptive statistics publications
do "${code}/table_descriptive_statistics_publications.do"
markstat using "${output}/print_table_descriptive_statistics_publications.stmd", docx

// table a2: female authorship publications
do "${code}/table_female_representation_publications.do"
markstat using "${output}/print_table_female_representation_publications.stmd", docx

// table a3: female authorship publications ssa birth records
do "${code}/table_female_representation_ssa_publications.do"
markstat using "${output}/print_table_female_representation_ssa_publications.stmd", docx

// table a4: female authorship publications manual gender assignment
do "${code}/table_female_representation_manual_publications.do"
markstat using "${output}/print_table_female_representation_manual_publications.stmd", docx

// table a5: female authorship publications article level
do "${code}/table_female_representation_article_level_publications.do"
markstat using "${output}/print_table_female_representation_article_level_publications.stmd", docx

// table a6: female authorship publications field control
do "${code}/table_female_representation_fields_publications.do"
markstat using "${output}/print_table_female_representation_fields_publications.stmd", docx

// table a7: distribution cumulative total publications publications
do "${code}/table_distribution_cumulative_total_publications_publications.do"
markstat using "${output}/print_table_distribution_cumulative_total_publications_publications.stmd", docx

// table a8: estimate cumulative publications last author publications
do "${code}/table_estimate_cumulative_publications_last_author_publications.do"
markstat using "${output}/print_table_estimate_cumulative_publications_last_author_publications.stmd", docx

// table a9: estimate cumulative publications publications
do "${code}/table_estimate_cumulative_publications_publications.do"
markstat using "${output}/print_table_estimate_cumulative_publications_publications.stmd", docx

// table a10: estimate cumulative total publications JEL author publications
do "${code}/table_cumulative_total_publications_jel_author_publications.do"
markstat using "${output}/print_table_cumulative_total_publications_jel_author_publications.stmd", docx

// table a11: female authorship publications seniority control
do "${code}/table_female_representation_seniority_publications.do"
markstat using "${output}/print_table_female_representation_seniority_publications.stmd", docx

// table a12: estimate solo author publications
do "${code}/table_estimate_solo_author_publications.do"
markstat using "${output}/print_table_estimate_solo_author_publications.stmd", docx

// table a13: distribution annual citations publications
do "${code}/table_distribution_annual_citations_publications.do"
markstat using "${output}/print_table_distribution_annual_citations_publications.stmd", docx

// table a14: seniority papers commented on publications
do "${code}/table_commented_seniority_publications.do"
markstat using "${output}/print_table_commented_seniority_publications.stmd", docx

// table a15: likelihood an editor is commented on publications
do "${code}/table_commented_editors_publications.do"
markstat using "${output}/print_table_commented_editors_publications.stmd", docx

// table a16: female authorship papers commented on publications
do "${code}/table_commented_female_representation_publications.do"
markstat using "${output}/print_table_commented_female_representation_publications.stmd", docx

// table a17: female authorship papers commented on gender commenter publications
do "${code}/table_commented_female_representation_commenter_gender_publications.do"
markstat using "${output}/print_table_commented_female_representation_commenter_gender_publications.stmd", docx

// table a18: seniority papers commented on gender commenter publications
do "${code}/table_commented_seniority_commenter_gender_publications.do"
markstat using "${output}/print_table_commented_seniority_commenter_gender_publications.stmd", docx

// figure a2: distribution fields publications
do "${code}/figure_distribution_fields_publications.do"

// figure a3: distribution number of authors publications
do "${code}/figure_distribution_number_authors_publications.do"

// figure a4: time between original paper and comment publications
do "${code}/figure_time_between_publications.do"

// figure a5: citations to comments vs papers publications
do "${code}/figure_citations_comments_relative_to_papers_publications.do"

// figure a6: cdf citations to comments and papers publications
do "${code}/figure_citations_cdf_publications.do"


// figure b1: female representation solo author preprints
do "${code}/figure_female_representation_solo_author_preprints.do"

// table b1: descriptive statistics preprints
do "${code}/table_descriptive_statistics_preprints.do"
markstat using "${output}/print_table_descriptive_statistics_preprints.stmd", docx

// table b2: female authorship preprints
do "${code}/table_female_representation_preprints.do"
markstat using "${output}/print_table_female_representation_preprints.stmd", docx

// table b3: female authorship paper level preprints
do "${code}/table_female_representation_paper_level_preprints.do"
markstat using "${output}/print_table_female_representation_paper_level_preprints.stmd", docx

// table b4: female authorship solo author preprints
do "${code}/table_female_representation_solo_author_preprints.do"
markstat using "${output}/print_table_female_representation_solo_author_preprints.stmd", docx


// table c2: descriptive statistics experiment
do "${code}/table_descriptive_statistics_experiment.do"
markstat using "${output}/print_table_descriptive_statistics_experiment.stmd", docx

// table c3: choice experiment
do "${code}/table_choice_experiment.do"
markstat using "${output}/print_table_choice_experiment.stmd", docx

// figure c1: choice incentive treatments experiment
do "${code}/figure_choice_incentive_treatments_experiment.do"




